package com.hwz.hwzliving.commodity.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        //设置溢出跳转到1
        paginationInterceptor.setOverflow(true);
        //设置最大显示数
        paginationInterceptor.setLimit(100);
        return paginationInterceptor;
    }
}
